package com.example.testndk;

/**
 * Created by lockey on 2017/7/12.
 */
public class JNIDynamicUtils {
    /**
     * 调用C++代码的方法
     * @param buf
     * @param w
     * @param h
     * @return
     */
    public static native int[] grayPic(int[] buf, int w, int h);
    //public static native String getPackname(Object o);//静态
    //public static native String getHelloStringFromJNI();//动态
    //public static native String getSumFromJNI(int i1, int i2);//计算
    //public static native int getStrLength(String str) throws NullPointerException, IllegalArgumentException;//异常
    //public static native int[] grayPic(int[] buf, int w, int h);//灰图

    /**
     * 加载so库或jni库
     */
    static {
        System.loadLibrary("JNI_DYNAMIC_ANDROID_TEST");//动态
        // System.loadLibrary("JNI_ANDROID_TEST");//静态
    }
}
